package com.qq.first_project.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qq.first_project.entity.Picture;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Qiu
 * @since 2022-06-10
 */
public interface PictureMapper extends BaseMapper<Picture> {
//    @Select("select id, path, owner from picture where owner = #{ownerName}")
//    List<Picture> getPictureByOwner(String ownerName);

//    @Insert("insert into picture(path, owner) values(#{path}, #{owner})")
//    @Options(useGeneratedKeys = true, keyProperty = "id")
//    public int insertPicture(Picture picture);

    // 分页查询所有图片
    IPage<Picture> pageList(Page<Picture> page, String name);
}
